package cn.t.modules.scheduler.common.data;

/**
 * @author 陶敏麒
 * @date 2023/8/22 9:35
 */
public enum ErrorCode {
    OK(0, ""),

    BIZ_ERROR(1, "业务异常"),

    DUP_ERROR(222, "重复操作"),

    NOT_FOUND(404, "指定数据不存在"),

    UN_NORMAL_STATUS(407, "状态异常"),

    INVALID_OPERATE(405, "指定操作不支持"),


    NO_AUTH(1403, "没有权限"),

    PARAM_INVALID(400, "参数不合法"),

    AUTH_FAILED(401, "认证失败"),

    CONCURRENCY_OPERATE(402, "其他人正在操作"),

    SYS_ERROR(500, "系统异常"),

    ;
    private final int code;

    private final String desc;

    ErrorCode(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
